#ifndef USER_H
#define USER_H
	#include "hardwareconfig.h"
	#include "serial.h"
	#include <string.h>
	
	typedef struct camera
	{	
		CAMERA_PIN pin;
		uint8_t  camera_trigger_cmpt;
		uint8_t  camera_trigger_enable;
		uint8_t  camera_level;
		uint8_t  random_wait_enable;
		uint32_t camera_trigeer_old_time;
		uint32_t camera_trigeer_time;
		uint32_t camera_loop_time;
		uint32_t random_wait_time;
	}Camera;
	
	void init_system(void);
	
	void app(void);
	
	void time_5ms_callback(void);
	
	void led_callback(uint32_t blink_time);
	
	void camera_init(void);
	
	void camera_update(void);
	
	void camera_trigger(Camera* cam, GPIO_PinState sta);
	
	uint64_t get_system_time_us(void);
	
	uint32_t get_system_time_ms(void);
	
#endif

